import request from "../utils/request";

var prefix = '/user-service/user'

export function signUp(user, head) {
    return request({
        url: prefix.concat('/signup'),
        headers: head,
        method: 'post',
        data: user
    })
}

export function userExist(account) {
    return request({
        url: prefix.concat('/exist'),
        method: 'get',
        params: {
            account: account,
        }
    })
}

export function userDetail(id) {
    return request({
        url: prefix.concat("/detail/", id),
        method: 'get'
    })
}

export function userList(param){
    return request({
        url: prefix.concat("/page"),
        method: 'post',
        data: param
    })
}

export function updateUser(param){
    return request({
        url:prefix.concat("/update"),
        method:'post',
        data:param
    })
}

export function updatePassword(param){
    return request({
        url:prefix.concat("/updatepassword"),
        method:'post',
        data:param
    })
}
export function updateEmail(param){
    return request({
        url:prefix.concat("/updateemail"),
        method:'post',
        data:param
    })
}
